FILES Statement ---------------------------------------------------------------------------- Action Prints the names of files residing on the specified disk. Syntax FILES -filespec$- Remarks The argument filespec$ is a string variable or constant that includes either a filename or a path, and an optional device name. If no argument is specified, the FILES statement lists all the files in the current directory. You can use the DOS wildcard characters -- question marks ( ?) or asterisks (*). A question mark matches any single character in the filename or extension. An asterisk matches one or more characters starting at that position. If you use filespec$ without an explicit path, the current directory is the default. Examples The statements below illustrate the use of FILES. Note that execution halts if you try to run this example without a disk in drive B or if the specified files cannot be found. FILES' Show all files on the current directory. FILES "*.BAS" ' Show all files with the extension .BAS. FILES "B.*.*" ' Show all files in current directory of drive B. FILES "B." ' Equivalent to "B.*.*". FILES "TEST?.BAS" ' Show all five-letter files whose names start ' with "TEST" and end with the .BAS extension. FILES "SALES\"' If SALES is a directory, this statement ' displays all files in SALES.